#include <stdio.h>
#include <wiringPi.h>
#include <softPwm.h>
#include "humi.h"

double temp_value = 0.0;
double humi_value = 0.0;

int main(int argc, char *argv[])
{
    if(wiringPiSetup() == -1){
        printf("setup wiringPi failed !");
        return 1;
    }
    printf("Hello World!\n");

    humi_init();
    while(1)
    {
        humi_getValue();
        printf("Temp: %.2f\n", temp_value);
        printf("Humi: %.2f\n", humi_value);

        delay(1000);
    }
    return 0;
}
